<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
</head>
<body>
<div id="app">

</div>
<script>
    //发送post方式的请求，参数需要以对象的形式传递
    axios.post("http://localhost:8080/vue/save",{
        id:"1006",
        lastName:"vue",
        email:"vue.js@vue.com",
        gender:"1",
        department:{id:"101",departmentName:"D-AA"},
        birth:new Date()
    }).then(function (response) {
        console.log(response.data);
    }).catch(function (error) {
        console.log(error)
    });
    var app = new Vue({
        el: '#app',
        data: {},
        methods: {}
    });
</script>
</body>
</html>